﻿using System;
using System.ComponentModel;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    public class TopProductImg : BaseObject
    {
        //begin
        public TopProductImg(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _Id;
        [Size(SizeAttribute.Unlimited)]
        public string Id
        {
            get
            {
                return _Id;
            }
            set
            {
                SetPropertyValue("Id", ref _Id, value);
            }
        }
        private string _ProductId;
        [Size(SizeAttribute.Unlimited)]
        public string ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                SetPropertyValue("ProductId", ref _ProductId, value);
            }
        }
        private string _Url;
        [Size(SizeAttribute.Unlimited)]
        public string Url
        {
            get
            {
                return _Url;
            }
            set
            {
                SetPropertyValue("Url", ref _Url, value);
            }
        }
        private long _Position;
        public long Position
        {
            get
            {
                return _Position;
            }
            set
            {
                SetPropertyValue("Position", ref _Position, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        private DateTime _Modified;
        public DateTime Modified
        {
            get
            {
                return _Modified;
            }
            set
            {
                SetPropertyValue("Modified", ref _Modified, value);
            }
        }
        private TopProduct _Product;
        [Association("ProductProductImgs", typeof(TopProduct))]
        public TopProduct Product
        {
            get
            {
                return _Product;
            }
            set
            {
                SetPropertyValue("Product", ref _Product, value);
            }
        }
        //end

    }
}
